#include "Rp2Application.h"

using namespace Rp2;

// Explicit instantiation
Application* Application::TheApplication = 0;
Application::EntryPoint Application::Run = 0;

//---------------------------------------------------------------------------------------------------
Application::Application()
{
}
//---------------------------------------------------------------------------------------------------
Application::~Application()
{
}
//---------------------------------------------------------------------------------------------------
int main()
{
 	Main::Initialize();

	if (Application::Run)
	{
        // Always check the current working directory.
        System::InsertDirectory(".");

        // The path to scene graph files.
        std::string kDir;
        kDir = std::string("../Data/Wmof");
        System::InsertDirectory(kDir.c_str());

        // The path to texture image files.
        kDir = std::string("../Data/Wmif");
        System::InsertDirectory(kDir.c_str());

        // The path to shader program files.
        kDir = std::string("../Data/Wmsp");
        System::InsertDirectory(kDir.c_str());

        // The path to other images.
        kDir = std::string("../Data/Im");
        System::InsertDirectory(kDir.c_str());

		// Path to shader directory
        kDir = std::string("../Data/ShaderPrograms/Cg");
        System::InsertDirectory(kDir.c_str());

		Application::Run();

		System::RemoveAllDirectories();
	}

	Main::Terminate();

	return 0;
}
//---------------------------------------------------------------------------------------------------